<template>
    <div class="page-tabbar">
        <mt-tabbar v-model="index" fixed v-if="settings.isShow" @input="onTabChange">
            <mt-tab-item id="0">
                <span class="iconfont icon-home" slot="icon"></span>首页
            </mt-tab-item>
            <mt-tab-item id="1">
                <span class="iconfont icon-wode" slot="icon"></span>我的
            </mt-tab-item>
        </mt-tabbar>
    </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
    components: {},
    data() {
        return {
            index: "0"
        }
    },
    props: {
        settings: {
            type: Object,
            require: true
        }
    },
    methods: {
        onTabChange(id) {
            if (id == '0') {
                this.$router.push('/tab-home')
            } else if (id == '1') {
                this.$router.push('/tab-my')
            }
        }
    }
}
</script>
<style lang="less">
.page-tabbar {
  overflow: hidden;
  height: 100vh;
}
</style>
